@import "../../config";
@import "./time";
@import "./search";
@import "./menu";

// 主页
.home {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  z-index: 0;
  transition: $defaultTransition;

  // 背景图片
  &-cover {
    @extend .full-screen;
    transition: $defaultTransition;
    background-position: center;
    background-size: cover;

    // 毛玻璃特效
    &.active {
      filter: blur(10px);
      transform: scale(1.1);
    }
  }

  // 图片蒙版
  &-mask {
    @extend .full-screen;
    background-color: rgba(0, 0, 0, 0.3);
  }

  // 固定便笺列表
  .note-list-pin {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 250px;
    max-height: 100%;
    padding: 20px;

    // 列表项
    .item {
      position: relative;
      margin-bottom: 10px;
      padding: 10px 20px;
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.8);
      line-height: 1.4;
      font-size: $fontSmall;

      // 标题
      .title {
        font-size: $fontSmall + 1;
        cursor: pointer;
        transition: $defaultTransition;
        user-select: none;
        // 单行文本溢出显示省略号
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        &:hover {
          color: rgba(10, 103, 0, 0.8);
        }
      }

      // 时间
      .time {
        color: rgba(0, 0, 0, 0.35);
      }

      // 取消固定
      .unpin {
        position: absolute;
        top: 2px;
        right: 5px;
        cursor: pointer;
        color: rgba(0, 0, 0, 0.35);
        opacity: 0;
        transition: $defaultTransition;

        &:hover {
          color: rgba(255, 0, 0, 0.8);
        }
      }

      &:hover .unpin {
        opacity: 1;
      }

      &:last-child {
        margin-bottom: 0;
      }
    }
  }
}
